#!/usr/bin/env node

const fs = require('fs').promises;

const src = process.argv[2];
const dst = process.argv[3];

async function copyFile() {
  try {
    const data = await fs.readFile(src);
    const stat = await fs.stat(src);
    await fs.writeFile(dst, data, { mode: stat.mode });
  } catch (err) {
    console.error('Error copying file:', err.message);
  }
}

copyFile();